<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<a th:href="@{/toAudit}">审核</a>
<script type="text/javascript" th:src="@{/static/js/vue.js}"></script>
<table id="updateTable">
    <tr th:each="marketer : ${marketers}">
        <td><a th:href="@{'/toAdminGoods/'+${marketer.marketersId}}">
            <img style="width: 400px;height: 400px" th:src="@{'/photo/'+${marketer.avatar}}"></a>
        </td>
        <td th:text="${marketer.marketersName}"></td>
        <td><a @click="forbidMarketers" th:href="@{'/forbidMarketers/'+${marketer.marketersId}}">禁止</a></td>
        <td><a @click="forbidMarketers" th:href="@{'/unsealMarketers/'+${marketer.marketersId}}">解禁</a></td>
    </tr>
</table>
<form id="updateForm" method="post">
    <input type="hidden" name="_method" value="put" >
</form>


<script type="text/javascript">
    var vue = new Vue({
        el:"#updateTable",
        methods:{
            forbidMarketers:function (event) {
                var updateForm = document.getElementById("updateForm");
                updateForm.action = event.target.href;
                updateForm.submit();
                event.preventDefault();
            },
        },
    });
</script>
</body>
</html>